<script>on mouseUpglobal GlobalVarsList,GlobalVar1,GlobalVar2set loc of window "Variable Watcher" to "0,18"set rect of window "Variable Watcher" to "0,0,300,60"set hbarloc of window "variable watcher" to 58show variable watcherput "Saving current global variables"SaveCurrentGlobalshide variable watchershow variable watcherwait 2 secsput "Creating global variables ΓÇ£GlobalVar1ΓÇ¥ et ΓÇ£GlobalVar2ΓÇ¥"put "Something" into GlobalVar1put "Something else" into GlobalVar2hide variable watchershow variable watcherwait 2 secsput "Purging global variables ΓÇ£GlobalVar1ΓÇ¥ et ΓÇ£GlobalVar2ΓÇ¥"ClearStackGLobalshide variable watchershow variable watcherwait 2 secshide variable watcherput emptyhide msgend mouseUp</script>
</part>
<content>
<layer>card</layer>
<id>1</id>
<text> GlobalMaster stack by Frédéric RINALDI This stack contains two XCMDs which allow to easily purge all global variables created by the stack. They work only with HyperCard 2.0. SaveCurrentGlobals 1.0DESCRIPTION------------ SaveCurrentGlobals saves the list of current active globals.SYNTAX------- SaveCurrentGlobalsPARAMETERS------------ Using "!" and "?" as parameter will return an online help (resp. copyright and syntax).USING----- SaveCurrentGlobals must appear in the "on openStack" handler before any global variable setting. The XCMD creates a global named GlobalVarsList which will be used later by ClearStackGlobals XCMD.If an error occurs, SaveCurrentGlobals can return : "Error : Out of Memory" ClearStackGlobals 1.0DESCRIPTION------------ ClearStackGlobals purges all global variables created since call to SaveStackGlobals.SYNTAX-------- ClearStackGlobalsPARAMETERS------------ Using "!" and "?" as parameter will return an online help (resp. copyright and syntax).USING------ ClearStackGlobals will generally be located in the "on closeStack" handler. The XCMD uses the global variable GlobalVarsList created earlier by SaveCurrentGlobals to find globals that must be cleared.--------------------------------------------------------------------This (these) external(s) is (are) FreeWare,allowing unlimited use in any non-commercial stack. You just need in this case to mention the author's name and copyright in your stack.Any commercial use must be licensed and aknowledged by the author. © F. Rinaldi - 1989,1990AppleLink: RINALDI1 CalvaCom : FR10 Compuserve : 71170,2111</text>